package com.xjx.util.domain;

    public class User {
        private String id;
        private String name;
        private String age;
        private String sex;
        private String address;

        public User() {
        }

        public User(String id, String name, String age, String sex, String address) {
            this.id = id;
            this.name = name;
            this.age = age;
            this.sex = sex;
            this.address = address;
        }

        public String getId() {
            return id;
        }

        public User setId(String id) {
            this.id = id;
            return this;
        }

        public String getName() {
            return name;
        }

        public User setName(String name) {
            this.name = name;
            return this;
        }

        public String getAge() {
            return age;
        }

        public User setAge(String age) {
            this.age = age;
            return this;
        }

        public String getSex() {
            return sex;
        }

        public User setSex(String sex) {
            this.sex = sex;
            return this;
        }

        public String getAddress() {
            return address;
        }

        public User setAddress(String address) {
            this.address = address;
            return this;
        }

        @Override
        public String toString() {
            return "User{" +
                    "id='" + id + '\'' +
                    ", name='" + name + '\'' +
                    ", age='" + age + '\'' +
                    ", sex='" + sex + '\'' +
                    ", address='" + address + '\'' +
                    '}';
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof User)) return false;

            User user = (User) o;

            if (getId() != null ? !getId().equals(user.getId()) : user.getId() != null) return false;
            if (getName() != null ? !getName().equals(user.getName()) : user.getName() != null) return false;
            if (getAge() != null ? !getAge().equals(user.getAge()) : user.getAge() != null) return false;
            if (getSex() != null ? !getSex().equals(user.getSex()) : user.getSex() != null) return false;
            return getAddress() != null ? getAddress().equals(user.getAddress()) : user.getAddress() == null;
        }

        @Override
        public int hashCode() {
            int result = getId() != null ? getId().hashCode() : 0;
            result = 31 * result + (getName() != null ? getName().hashCode() : 0);
            result = 31 * result + (getAge() != null ? getAge().hashCode() : 0);
            result = 31 * result + (getSex() != null ? getSex().hashCode() : 0);
            result = 31 * result + (getAddress() != null ? getAddress().hashCode() : 0);
            return result;
        }
}
